# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=XML-NamespaceSupport
pkgname=perl-${_realname}
pkgver=1.11
pkgrel=2
pkgdesc="Generic namespace helpers (ported from SAX2)"
arch=('any')
url="http://search.cpan.org/dist/XML-NamespaceSupport"
groups=('perl-modules')
license=('GPL')
depends=('perl')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/P/PE/PERIGRIN/${_realname}-${pkgver}.tar.gz"
        'XML-NamespaceSupport-1.11.patch')
md5sums=('222cca76161cd956d724286d36b607da'
         'd25f2d1b364849705db8c5879f00177c')

prepare() {
  cd  "${srcdir}/${_realname}-${pkgver}"
  patch -p1 -i ${srcdir}/XML-NamespaceSupport-1.11.patch
}

build() {
  cd  "${srcdir}/${_realname}-${pkgver}"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "${srcdir}/${_realname}-${pkgver}"

  make install DESTDIR="${pkgdir}"

  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
